home *** CD-ROM | disk | FTP | other *** search
- COLLIDE(1) Last changed: 1-4-99
-
-
- NNAAMMEE
- ccoolllliiddee - Look for name collisions between libraries
-
- SSYYNNOOPPSSIISS
- ccoolllliiddee [--ll] [--dd] [--ww] _f_i_l_e ...
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- When porting a large application, a critical question is ``How do I
- know if names in this application conflict with names in libraries I
- must use?'' ccoolllliiddee answers that question by finding name collisions
- across archive libraries and object files. It treats a Dynamic Shared
- Object (dso) as if it were an archive library.
-
- Given a list of files, ccoolllliiddee finds all duplicate external names and
- writes those names to standard output. There is no output if there
- are no conflicts.
-
- The --ll (longform) option adds the object file names to the output.
- This must be the first option to ccoolllliiddee if it is specified at all.
-
- The --dd (show duplicates) option reports duplicate external names on
- standard error. This reports the same problems aarr would if run on the
- same object files but in more detail. --dd applies to object files, not
- archive libraries.
-
- The --ww (weak symbol) option treats weak symbols the same as normal
- external symbols. By default, weak symbols are ignored in the search
- for duplicates.
-
- The _f_i_l_es named may be either archive libraries or object files. A
- list of object files is gathered together (by //uussrr//lliibb//ccoolllliiddee11) just
- as is done by aarr(1). Gathering of a list of objects stops when an
- archive name is seen. Object gathering is important because a common
- declaration may appear in multiple files yet it does not reflect a
- name duplication.
-
- ccoolllliiddee is a shell script that uses //uussrr//lliibb//ccoolllliiddee11 to extract the
- public symbols from each archive (or gathered collection of objects)
- and notes the object file name and archive name along with the symbol.
- You may find it useful to find which library or object contains a
- name, (the name may be a weak symbol). For example, the following do
- roughly the same thing:
-
- /usr/lib/collide1 -w /usr/lib/libc.a | grep strcpy
- nm -Bo /usr/lib/libc.a | grep strcpy
-
- If there are too many objects to list them all on the command line,
- use the aarr(1) command to build an archive.
-
- Examples:
-
- cd /usr/lib
- collide libgl_s.a libc.a libcps.a /tmp/mylib.a
- cd /usr/tmp
- # a.o b.o treated as if in archive "none".
- # c.o d.o treated as if in a separate archive "none".
- collide -d a.o b.o /usr/lib/libc.a c.o d.o
-
- ar cr mylib.a *.o
- collide mylib.a /usr/lib/libc.a
-
- # Not useful. All the externals are collisions.
- collide libc_s.a libc.a
-
- FFIILLEESS
- //uussrr//ssbbiinn//ccoolllliiddee
- //uussrr//lliibb//ccoolllliiddee11
-
- NNOOTTEESS
- The format of a line written by ccoolllliiddee11 is:
-
- variable-name objectfile-name archive-name
-
- Each name is separated by a tab; the line ends with a newline. There
- are no blanks or extraneous characters in the output.
-
- If you supply object names to ccoolllliiddee, specify the --dd option.
-
- While the C language does not have FORTRAN common declarations per se,
- the declaration iinntt cc;; will, if it appears outside of any function
- declaration be marked in the symbol table as ccoommmmoonn (with Traditional
- C only - not with ANSI C).
-
- NNOOTTEESS
- ccoommmmoonn declarations that appear in different archives can cause false
- reports of duplications. This should not happen if you put all your
- objects in a single archive or list all your objects together on the
- command line.
-
- ccoolllliiddee recognizes an object as a dso by looking for names ending in
- ..ssoo or ..ssoo..<<NN>> (where <<NN>> is a number, as in ..ssoo..11) so dso's not named
- that way are treated as simple object files.
-
- SSEEEE AALLSSOO
-